﻿using System;
using Telerik.Web.UI;

public partial class ltMan_singles_singleList : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlPager pager = new SqlPager("lt_article_content_only", "oid", "*");
        if (!string.IsNullOrEmpty(sName.Text))
            pager.Where = " title like '%" + sName.Text.Replace("'", "''") + "%'";
        pager.OrderBy = "addtime desc";
        RadGridBinder.Create(RadGrid1, pager);
    }
    protected void RadGrid1_DeleteCommand(object sender, GridCommandEventArgs e)
    {
        int id = int.Parse(GridCommander.ExtractValue(e, "oid"));
        ltModel.BLL.article_content_only aconly = new ltModel.BLL.article_content_only();
        ltModel.Model.article_content_only nonly = aconly.GetModel(id);
        OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "单篇管理-删除>" + nonly.title);
        aconly.Delete(id);
    }
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
    }
    protected void b1_Click(object sender, EventArgs e)
    {
        RadGrid1.Rebind();
    }
}